import service from '@/utils/request'

export const fishGroundsList = (params) => {
  return service({
    url: '/manager/fish/grounds/list',
    method: 'get',
    params
  })
}

export const groundsChangeStatus = (id) => {
  return service({
    url: `/manager/fish/grounds/change/status/${id}`,
    method: 'post'
  })
}

export const groundsDelete = (id) => {
  return service({
    url: `/manager/fish/grounds/delete/${id}`,
    method: 'post'
  })
}

export const groundsAdd = (data) => {
  return service({
    url: '/manager/fish/grounds/add',
    method: 'post',
    data
  })
}

export const groundsedit = (data) => {
  return service({
    url: '/manager/fish/grounds/edit',
    method: 'post',
    data
  })
}

export const fishPondList = (params) => {
  return service({
    url: '/manager/fish/pond/list',
    method: 'get',
    params
  })
}

export const pondChangeStatus = (id) => {
  return service({
    url: `/manager/fish/pond/change/status/${id}`,
    method: 'post'
  })
}

export const pondDelete = (id) => {
  return service({
    url: `/manager/fish/pond/delete/${id}`,
    method: 'post'
  })
}

export const pondAdd = (data) => {
  return service({
    url: '/manager/fish/pond/add',
    method: 'post',
    data
  })
}

export const pondedit = (data) => {
  return service({
    url: '/manager/fish/pond/edit',
    method: 'post',
    data
  })
}

export const fishSpotList = (id) => {
  return service({
    url: `/manager/fish/spot/list/${id}`,
    method: 'get'
  })
}

export const fishSpotAdd = (data) => {
  return service({
    url: '/manager/fish/spot/add',
    method: 'post',
    data
  })
}

export const spotChangeStatus = (data) => {
  return service({
    url: '/manager/fish/spot/change/status',
    method: 'post',
    data
  })
}

export const fishSpotDelete = (id) => {
  return service({
    url: `/manager/fish/spot/delete/${id}`,
    method: 'post'
  })
}

export const userFishLog = (params) => {
  return service({
    url: '/manager/user/fish/log',
    method: 'get',
    params
  })
}

export const fishEnd = (data) => {
  return service({
    url: '/manager/user/fish/end',
    method: 'post',
    data
  })
}

export const miniList = (params) => {
  return service({
    url: '/manager/mini/list',
    method: 'get',
    params
  })
}

export const fastRegister = (data) => {
  return service({
    url: '/manager/mini/fast/register',
    method: 'post',
    data
  })
}

export const templateList = (params) => {
  return service({
    url: '/manager/mini/template/list',
    method: 'get',
    params
  })
}

export const miniCommit = (data) => {
  return service({
    url: '/manager/mini/commit',
    method: 'post',
    data
  })
}

export const allCategories = (params) => {
  return service({
    url: '/manager/mini/all/categories',
    method: 'get',
    params
  })
}

export const submitAudit = (data) => {
  return service({
    url: '/manager/mini/submit/audit',
    method: 'post',
    data
  })
}
export const bindTester = (data) => {
  return service({
    url: '/manager/mini/bind/tester',
    method: 'post',
    data
  })
}
export const miniQrcode = (params) => {
  return service({
    url: '/manager/mini/qrcode',
    method: 'get',
    params
  })
}

export const setHeadImage = (data) => {
  return service({
    url: '/manager/mini/set/head/image',
    method: 'post',
    data
  })
}
export const setNickname = (data) => {
  return service({
    url: '/manager/mini/set/nickname',
    method: 'post',
    data
  })
}

export const modifyDomain = (data) => {
  return service({
    url: '/manager/mini/modify/domain',
    method: 'post',
    data
  })
}

export const miniRelease = (appId) => {
  return service({
    url: `/manager/mini/release?appId=${appId}`,
    method: 'post'
  })
}

export const auditStatus = (params) => {
  return service({
    url: '/manager/mini/audit/status',
    method: 'get',
    params
  })
}

export const mediaUpload = (data) => {
  return service({
    url: '/manager/mini/media/upload',
    method: 'post',
    data
  })
}

export const districtCode = (params) => {
  return service({
    url: '/manager/mini/query/icp/district/code',
    method: 'get',
    params
  })
}

export const certificateTypes = (params) => {
  return service({
    url: '/manager/mini/query/icp/certificate/types',
    method: 'get',
    params
  })
}

export const nrlxTypes = (params) => {
  return service({
    url: '/manager/mini/query/icp/nrlx/types',
    method: 'get',
    params
  })
}

export const authAndIcp = (data) => {
  return service({
    url: '/manager/mini/auth',
    method: 'post',
    data
  })
}

export const raftList = (params) => {
  return service({
    url: '/manager/mini/template/raft/list',
    method: 'get',
    params
  })
}

export const addToTemplate = (draftId) => {
  return service({
    url: `/manager/mini/add/to/template?draftId=${draftId}`,
    method: 'post'
  })
}

export const openBind = (appId) => {
  return service({
    url: `/manager/mini/open/bind?appId=${appId}`,
    method: 'post'
  })
}

export const fileUpload = (data) => {
  return service({
    url: '/file/upload',
    method: 'post',
    data,
    headers:{'Content-Type': 'multipart/form-data'}
  })
}


export const icpUpload = (data) => {
  return service({
    url: '/manager/mini/upload/icp/media',
    method: 'post',
    data
  })
}

export const miniIcp = (data) => {
  return service({
    url: '/manager/mini/icp',
    method: 'post',
    data
  })
}

export const authQuery = (appId) => {
  return service({
    url: `/manager/mini/auth/query?appId=${appId}`,
    method: 'post'
  })
}

export const icpQuery = (appId) => {
  return service({
    url: `/manager/mini/icp/query?appId=${appId}`,
    method: 'get'
  })
}

export const miniEdit = (data) => {
  return service({
    url: '/manager/mini/edit',
    method: 'post',
    data
  })
}

export const miniDelete = (id) => {
  return service({
    url: `/manager/mini/delete/${id}`,
    method: 'post'
  })
}

export const addCategories = (data) => {
  return service({
    url: '/manager/mini/add/categories',
    method: 'post',
    data
  })
}

export const getCategories = (params) => {
  return service({
    url: '/manager/mini/get/categories',
    method: 'get',
    params
  })
}

export const setSignature = (data) => {
  return service({
    url: '/manager/mini/set/signature',
    method: 'post',
    data
  })
}

export const privacySetting = (appId) => {
  return service({
    url: `/manager/mini/set/privacy/setting?appId=${appId}`,
    method: 'post'
  })
}

export const authLink = () => {
  return service({
    url: '/manager/mini/auth/link?type=2',
    method: 'get'
  })
}

export const contentTypes = (params) => {
  return service({
    url: '/manager/mini/query/icp/service/content/types',
    method: 'get',
    params
  })
}

export const verifyTask = (appId) => {
  return service({
    url: `/manager/mini/icp/verify/task?appId=${appId}`,
    method: 'post'
  })
}

export const miniVersion = (appId) => {
  return service({
    url: `/manager/mini/version?appId=${appId}`,
    method: 'get'
  })
}

export const ticketList = (params) => {
  return service({
    url: '/manager/fish/ticket/list',
    method: 'get',
    params
  })
}

export const ticketAdd = (data) => {
  return service({
    url: '/manager/fish/ticket/add',
    method: 'post',
    data
  })
}

export const ticketEdit = (data) => {
  return service({
    url: '/manager/fish/ticket/edit',
    method: 'post',
    data
  })
}

export const verifyDelete = (id) => {
  return service({
    url: `/manager/fish/ticket/delete/${id}`,
    method: 'post'
  })
}

export const userVip = (params) => {
  return service({
    url: '/manager/user/vip',
    method: 'get',
    params
  })
}

export const vipAdd = (data) => {
  return service({
    url: '/manager/user/vip/add',
    method: 'post',
    data
  })
}

export const vipEdit = (data) => {
  return service({
    url: '/manager/user/vip/edit',
    method: 'post',
    data
  })
}

export const vipDelete = (id) => {
  return service({
    url: `/manager/user/vip/delete/${id}`,
    method: 'post'
  })
}

export const userGear = (params) => {
  return service({
    url: '/manager/user/gear',
    method: 'get',
    params
  })
}

export const gearAdd = (data) => {
  return service({
    url: '/manager/user/gear/add',
    method: 'post',
    data
  })
}

export const gearEdit = (data) => {
  return service({
    url: '/manager/user/gear/edit',
    method: 'post',
    data
  })
}

export const gearDelete = (id) => {
  return service({
    url: `/manager/user/gear/delete/${id}`,
    method: 'post'
  })
}